]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
background: fix typo updating images for animated background
authorGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 26 Jun 2014 16:25:14 +0000 (18:25 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 26 Jun 2014 17:20:17 +0000 (19:20 +0200)
We must remove the old image from the cache, not the new one.

This was causing a leak of old (and expensive) background
images, and was causing errors at the end of animations, trying
to destroy the animated background.

js/ui/background.js

index 3cdc7ef375ac7214cfa9d9b2761c492df2f4bd96..3730beb3a1490e8bc01f31631f26e72c1fcbcb7a 100644 (file)
@@ -448,7 +448,7 @@ const Background = new Lang.Class({
 
         let image = this._images[index];
         if (image.content)
-            this._cache.removeImageContent(content);
+            this._cache.removeImageContent(image.content);
         image.content = content;
         this._watchCacheFile(filename);
     },